package com.elvin.platform.beans;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 报警规则表
 * </p>
 *
 * @author zhenchl
 * @since 2022-06-06
 */
@TableName("alarm_rule")
public class AlarmRule extends Model<AlarmRule> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 设备身份编码ID
     */
    private String imei;
    /**
     * 设备表ID
     */
    private Long deviceId;
    /**
     * 报警电话
     */
    private String phone;
    /**
     * 报警邮箱
     */
    private String email;
    /**
     * 报警微信openID
     */
    private String openid;
    /**
     * 下发设备命令字符串
     */
    private String openDeviceArgs;
    /**
     * 关闭设备命令字符串
     */
    private String closeDeviceArgs;
    /**
     * 报警联动设备表ID
     */
    private Long toDeviceId;
    /**
     * 报警等级（1.警告，2.一般，3.严重，4. 致命)
     */
    private Integer alarmLevel;
    /**
     * 报警规则类型（1.邮箱，2.短信，3.电话，4.微信推送，5.comment 联动设备）
     */
    private Integer ruleType;
    /**
     * 是否接收通知 true 或false
     */
    private Boolean isReceiveMsg;
    /**
     * 审核状态，0，待审核，1.审核通过，2.审核失败
     */
    private Integer status;
    /**
     * 设备id
     */
    private String devId;
    /**
     * 申请人
     */
    private String applicant;
    /**
     * 用户表id
     */
    private Long userId;

    public Boolean getReceiveMsg() {
        return isReceiveMsg;
    }

    public void setReceiveMsg(Boolean receiveMsg) {
        isReceiveMsg = receiveMsg;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getImei() {
        return imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getOpenDeviceArgs() {
        return openDeviceArgs;
    }

    public void setOpenDeviceArgs(String openDeviceArgs) {
        this.openDeviceArgs = openDeviceArgs;
    }

    public String getCloseDeviceArgs() {
        return closeDeviceArgs;
    }

    public void setCloseDeviceArgs(String closeDeviceArgs) {
        this.closeDeviceArgs = closeDeviceArgs;
    }

    public Long getToDeviceId() {
        return toDeviceId;
    }

    public void setToDeviceId(Long toDeviceId) {
        this.toDeviceId = toDeviceId;
    }

    public Integer getAlarmLevel() {
        return alarmLevel;
    }

    public void setAlarmLevel(Integer alarmLevel) {
        this.alarmLevel = alarmLevel;
    }

    public Integer getRuleType() {
        return ruleType;
    }

    public void setRuleType(Integer ruleType) {
        this.ruleType = ruleType;
    }



    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDevId() {
        return devId;
    }

    public void setDevId(String devId) {
        this.devId = devId;
    }

    public String getApplicant() {
        return applicant;
    }

    public void setApplicant(String applicant) {
        this.applicant = applicant;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "AlarmRule{" +
                "id=" + id +
                ", imei=" + imei +
                ", deviceId=" + deviceId +
                ", phone=" + phone +
                ", email=" + email +
                ", openid=" + openid +
                ", openDeviceArgs=" + openDeviceArgs +
                ", closeDeviceArgs=" + closeDeviceArgs +
                ", toDeviceId=" + toDeviceId +
                ", alarmLevel=" + alarmLevel +
                ", ruleType=" + ruleType +
                ", isReceiveMsg=" + isReceiveMsg +
                ", status=" + status +
                ", devId=" + devId +
                ", applicant=" + applicant +
                ", userId=" + userId +
                "}";
    }
}
